<template>
	<web-view :src="data.url"></web-view>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import { onLoad, onUnload } from '@dcloudio/uni-app';
const data = ref({
	appid: "wx0940b235b97afa13",
	redirect: 'https://zhushou.superjuanjuan.com/api/mp/callback',
	userId: uni.getStorageSync('userId'),
	scope: 'snsapi_base', // snsapi_base 不弹出授权页面 snsapi_userinfo 弹出授权页面
	url: ''
})
onLoad(() => {
	data.url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${data.value.appid}&redirect_uri=${encodeURIComponent(data.value.redirect)}&response_type=code&scope=${data.value.scope}&state=${data.value.userId}#wechat_redirect`
})
onUnload(() => {
	uni.$emit('tencent_isux', true)
})
</script>

<style scoped></style>